package at.jku.ssw.fortress.ui;

import java.util.HashMap;
import java.util.Map;

public class Bidirection<S,T> {
	
	private Map<S,T> function = new HashMap<S,T>();
	private Map<T,S> inverse = new HashMap<T,S>();
	
	public void setFunctionValue(S s, T t) {
		function.put(s, t);
		inverse.put(t, s);
	}
	
	public T value(S t) {
		return function.get(t);
	}
	
	public S inverse(T s) {
		return inverse.get(s);
	}

}
